Skip to content

Conversation

@vmichal
Copy link
Contributor

@vmichal vmichal commented Jan 9, 2026

When a formatting error is encountered while parsing expected_results.txt, report the line number as well.

The situation notably improved in #5948, but there is still a tiny improvement to be made.

@vmichal vmichal requested a review from a team as a code owner January 9, 2026 13:24
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jan 9, 2026
@StephanTLavavej StephanTLavavej self-assigned this Jan 9, 2026
@StephanTLavavej StephanTLavavej added enhancement Something can be improved test Related to test code labels Jan 9, 2026

def _parse_env_lst(env_lst: Path, ctx: _ParseCtx):
for line in parse_commented_file(env_lst):
for line_number, line in _parse_commented_file(env_lst):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pylance reports that line_number is unused. Using _ avoids this.

m = _EXPECTED_RESULT_REGEX.match(line)
if m is None:
raise Exception(f'Incorrectly formatted line "{line}" in {filename}.')
raise Exception(f'Incorrectly formatted line {line_number}: "{line}" in {filename}.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no objection to these changes, but how are they taking effect without my recently added check_libcxx_paths.py finding problems earlier during configuration? (It implicitly expects properly-formatted lines and is strict about seeing FAIL or SKIPPED so if it sees something unexpected like WOOF or SKIP then it thinks the whole line is a filename, and reports a missing file.)

Copy link
Contributor Author

@vmichal vmichal Jan 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy answer (I think obvious to you) - I did not really pay attention to the broader context of all involved python utilities, so I did not see this interaction.

Now, after review, I can see what you're hinting at. I think we should provide my proposed diagnostics in both cases - when running cmake and when running stl-lit. That suggests some degree of merging (at least partially) check_libcxx_paths and file_parsing.py; or at least one calling functionality from the other.

I will try to implement something, probably on Thursday. I think this has a rather low priority since it only affects us. Until then I converted this PR to draft. Feel free to close, if you prefer.

@github-project-automation github-project-automation bot moved this from Initial Review to Work In Progress in STL Code Reviews Jan 9, 2026
@StephanTLavavej StephanTLavavej removed their assignment Jan 9, 2026
@vmichal vmichal marked this pull request as draft January 11, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved test Related to test code

Projects

Status: Work In Progress

Development

Successfully merging this pull request may close these issues.

2 participants